/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm_candidatos;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class CandidatosCriteria extends AbstractORMCriteria {
	public final IntegerExpression id_candidato;
	public final StringExpression nombre;
	public final StringExpression run;
	public final IntegerExpression votos;
	
	public CandidatosCriteria(Criteria criteria) {
		super(criteria);
		id_candidato = new IntegerExpression("id_candidato", this);
		nombre = new StringExpression("nombre", this);
		run = new StringExpression("run", this);
		votos = new IntegerExpression("votos", this);
	}
	
	public CandidatosCriteria(PersistentSession session) {
		this(session.createCriteria(Candidatos.class));
	}
	
	public CandidatosCriteria() throws PersistentException {
		this(orm_candidatos.CandidatosVEPDSPersistentManager.instance().getSession());
	}
	
	public Candidatos uniqueCandidatos() {
		return (Candidatos) super.uniqueResult();
	}
	
	public Candidatos[] listCandidatos() {
		java.util.List list = super.list();
		return (Candidatos[]) list.toArray(new Candidatos[list.size()]);
	}
}

